/**
 * Created by XK-SH on 2017/5/11.
 */
import Vue from 'vue'
import VueResource from 'vue-resource';
Vue.use(VueResource);

export default {
  /**
   * 团队列表分页查询
   */
  listAllTeam(pageSize,pageNum,query) {
    return Vue.http.post("/teamManage/m/listAllTeam/"+pageSize+"/"+pageNum,query);
  },
  /**
   * 删除团队
   */
  deleteTeam(teamId) {
    return Vue.http.post("/teamManage/m/deleteTeam/"+teamId);
  },

  /**
   * 新增团队-新增成员
   */
  insertTeam(query) {
    return Vue.http.post("/teamManage/m/insertTeam",query);
  },



  /**
   * 新增团队/编辑团队-新增床位
   */
  editTeamInsertBedInfo(query) {
    return Vue.http.post("/teamManage/m/editTeamInsertBedInfo",query);
  },

  /**
   * 编辑团队-编辑团队信息
   */
  editTeamInfo(teamId,query) {
    return Vue.http.post("/teamManage/m/editTeamInfo/"+teamId,query);
  },

  /**
   * 编辑团队-新增成员
   */
  editTeamInsertEmp(teamId,query) {
    return Vue.http.post("/teamManage/m/editTeamInsertEmp/"+teamId,query);
  },

  /**
   * 编辑团队-删除成员
   */
  editTeamDeleteEmp(empId,teamId) {
    return Vue.http.post("/teamManage/m/editTeamDeleteEmp/"+empId+"/"+teamId);
  },

  /**
   * 修改团队-删除床位
   */
  editTeamDeleteBedInfo(bedId,teamId) {
    return Vue.http.post("/teamManage/m/editTeamDeleteBedInfo/"+bedId+"/"+teamId);
  },


  /**
   * 新增成员-获取可添加成员
   */
  getEmpByEmpName(query) {
    return Vue.http.post("/teamManage/m/getEmpByEmpName",query);
  },

  /**
   * 查询团队信息
   */
  getTeamByTeamId(teamId) {
    return Vue.http.get("/teamManage/m/getTeamByTeamId/"+teamId);
  },

  /**
   * 根据房间id获取床位信息
   */
  getAddBedVoByBedId(roomId,teamId) {
    return Vue.http.get("/teamManage/m/getAddBedVoByBedId/"+roomId+"/"+teamId);
  },

  /**
   * 获取查询床位视图
   */
  getStructureBedroomTree() {
    return Vue.http.get("/teamManage/m/getStructureBedroomTree");
  },
  getStructureBedroomTreeWithBeds() {
    return Vue.http.get("/teamManage/m/getStructureBedroomWithBeds");
  },

  /**
   * 获取所有团队服务类型
   */
  getAllTeamServiceType(){
    return Vue.http.get("/serviceItem/serviceTypes");
  },
  
}
